#include "http/http.h"

void test_req()
{
    johnsonli::http::HttpRequest::ptr http_req(new johnsonli::http::HttpRequest);
    http_req->setHeader("host", "www.sylay.top");
    http_req->setBody("hello world");
    std::cout << http_req << std::endl;
    //http_req->dump(std::cout) << std::endl;
}

void test_res()
{
    johnsonli::http::HttpResponse::ptr http_res(new johnsonli::http::HttpResponse);
    http_res->setHeader("XX-XX", "www.baidu.com");
    http_res->setBody("hello world");
    http_res->setStatus((johnsonli::http::HttpStatus)400);

    http_res->dump(std::cout) << std::endl;
}

int main()
{
    test_req();

    test_res();
    return 0;
}